import requests
import asyncio
from playwright.async_api import async_playwright, Playwright


""" 引用库：Request

网址：requests.get
正则表达式：re.findall
文件保存：open()
"""

url = 'https://www.douyin.com/search/元梦之星?type=live'



async def run(playwright: Playwright):
    chromium = playwright.chromium # or "firefox" or "webkit".
    browser = await chromium.launch()
    page = await browser.new_page()
    await page.goto(url)
    # other actions...
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())

















